package com.i.piccommon.util;

import com.i.piccommon.domain.User;
import io.netty.util.concurrent.FastThreadLocal;

/**
 * @author lewis
 * @type class
 * @description
 * @since 2024/10/23
 */


public class UserContext {
    private static final FastThreadLocal<Long> tl = new FastThreadLocal<>();
    public static void setUser(Long userId) {
        tl.set(userId);
    }
    public static Long getUser(){
        return tl.get();
    }
    public static void removeUser(){
        tl.remove();
    }
}

